/**
*time:2013-12-23
*creater:liting
*content:公用工具类型方法
*/ 
//var a = '{"id":"20131223161127051400E77DE81B8DE0","maturl":"http://localhost:80/cityplan/upload/{20131211-1055-4284-2000-A7B4711D7C6B}.prefab","points":\'[{"x":"-94.20557","y":"4.001099","z":"-174.2128"},{"x":"-314.2448","y":"4.001099","z":"-174.2128"},{"x":"-314.2448","y":"4.001099","z":"-77.36426"},{"x":"-94.20557","y":"4.001099","z":"-77.36426"}]\',"name":""}';
//把JSON数据中的    ‘[’    ‘]’  前面和后面加上双引号，使其成为字符串。比如：{"points":[*,*,*,*]} 就会变成:{"points":"[*,*,*,*]"}
function zkfAryToString(paJson){
	var ls_RJson = "";
	var item_1 =  paJson.indexOf("[");
	var ls_Json = "";
	if(item_1>-1){
		ls_Json  = paJson.substring(0,item_1)+"\""+paJson.substring(item_1,paJson.length);
		
		var item_2 =  ls_Json.indexOf("]");
		if(item_2>-1){
			ls_RJson  = ls_Json.substring(0,item_2+1)+"\""+ls_Json.substring(item_2+1,ls_Json.length);
		}
		
	}
	return ls_RJson; 
}

//把JSON数据中的    ‘[’    ‘]’  前面和后面去掉双引号，使其成为数组。比如：{"points":"[*,*,*,*]"} 就会变成:{"points":[*,*,*,*]}
function zkfStrToArray(paJson){ 
	return paJson.replace("\"[","[").replace("]\"","]");
} 

